<template>
    <div class="user-data-box">
        <div class="user-data-title">我的地盘</div>
        <div class="user-data-main">
            <div
                class="user-data-item"
                @click="goTeamList('teamData','2,3,4')"
            >
                <div class="user-data-info">{{parseInt(teamVipData.level_2)+parseInt(teamVipData.level_3)+parseInt(teamVipData.level_4)}}</div>
                <div class="user-data-name">店主</div>
            </div>
            <div class="line"></div>
            <div
                class="user-data-item"
                @click="goTeamList('myData','1')"
            >
                <div class="user-data-info">{{myVipData.level_1}}</div>
                <div class="user-data-name">会员</div>
            </div>
            <div class="line"></div>
            <div
                class="user-data-item"
                @click="goTeamList('myData','0')"
            >
                <div class="user-data-info">{{myVipData.level_0}}</div>
                <div class="user-data-name">游客</div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'UserData',
    props: ['myVipData', 'teamVipData'],
    methods: {
        goTeamList(type, level) {
            this.$router.push({
                path: '/teamList',
                query: {
                    type: type,
                    level: level
                }
            })
        }
    }
}
</script>

<style lang="stylus" scoped>
.user-data-box
    padding 0.4rem 0
    background #fff
    .user-data-title
        padding 0 0.34rem
        font-weight bold
        font-size 0.37rem
        color #131313
        line-height 1
    .user-data-main
        display flex
        align-items center
        margin-top 0.58rem
        .user-data-item
            flex 1
            text-align center
            .user-data-info
                font-size 0.37rem
                color #131313
            .user-data-name
                margin-top 0.26rem
                font-size 0.34rem
                color #888
        .line
            height 0.48rem
            width 1px
            background #999
</style>


